#include <iostream>
#include <typeinfo>
using namespace std;
void practice_2_34();
void practice_2_35();
void example_p61();
int main()
{
	//practice_2_34();
	//practice_2_35();
	example_p61();
	return 0;
}
void practice_2_34()
{
	int i=0,&r=i;
	auto a=r;
	cout<<"before a:"<<a<<endl;
	const int ci=i,&cr=ci;
	auto b=ci;
	cout<<"before b:"<<b<<endl;
	auto c=cr;
	cout<<"before c:"<<c<<endl;
	auto d=&i;
	cout<<"before d:"<<d<<endl;
	auto e=&ci;
	cout<<"before e:"<<e<<endl;
	auto &g=ci;
	cout<<"before g:"<<g<<endl;
	a=42;
	cout<<"after a:"<<a<<endl;
	b=42;
	cout<<"after b:"<<b<<" then ci:"<<ci<<endl;
	c=42;
	cout<<"after c:"<<c<<endl;
	//d=42;
	//cout<<"after d:"<<d<<" then *d:"<<*d<<endl;
	//e=42;
	//cout<<"after e:"<<e<<endl;
	//g=42;
	//cout<<"after g:"<<g<<endl;
}
void practice_2_35()
{
	const int i=42;
	auto j=i;
	const auto &k=i;
	//auto &k1=i;
	//k1=42;
	auto *p=&i;
	auto p1=&i;
	cout<<p<<" "<<p1<<endl;
	cout<<*p<<" "<<*p1<<endl;
	const auto j2=i,&k2=i;
	auto j1=i;
	j1=8;
}
int returnVal()
{
	return 8.5;
}
void example_p61()
{
	int returnVal();
	//auto i;
	auto a=returnVal();
	cout<<typeid(a).name()<<endl;
}